<div class="addDataNodeHtml dn">
  <form class="layui-form  add-costCode-form addDataNode" action="">
          <div class="layui-form-item">
            <label class="layui-form-label">编码<span>*</span>：</label>
            <div class="layui-input-block">
              <input type="text" name="code" lay-verify="required" autocomplete="off" placeholder="请输入编码" class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">名称<span>*</span>：</label>
            <div class="layui-input-block">
              <input type="text" name="name" lay-verify="required" placeholder="请输入名称" autocomplete="off" class="layui-input" />
            </div>
        </div>
          <button class="layui-btn addDataNode dn" lay-submit="" lay-filter="addDataNode">立即提交</button>
      </form>
</div>
<div class="addCostCodeHtml dn">
  <form class="layui-form add-costCode-form" action="">
    <div class="layui-form-item">
        <label class="layui-form-label">子目编码<span>*</span>：</label>
        <div class="layui-input-block">
          <input type="text" name="code" lay-verify="required|code" autocomplete="off" placeholder="子目编码格式为：数字-数字-数字" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">子目名称<span>*</span>：</label>
        <div class="layui-input-block">
          <input type="text" name="name" lay-verify="required" autocomplete="off" placeholder="请输入子目名称" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">项目特征<span>*</span>：</label>
        <div class="layui-input-block">
          <input type="text" name="projectProp" lay-verify="required" autocomplete="off" placeholder="请输入项目特征" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">计量单位<span>*</span>：</label>
      <div class="layui-input-block">
          <div id="selectunit" class="selectunit layui-unselect layui-form-select">
            <div class="layui-select-title">
                <input type="text" name="unit" placeholder="请输入或选择一个单位" lay-verify="required" value="" class="layui-input layui-unselect" autocomplete="off"><i class="layui-edge"></i>
            </div>
            <dl class="layui-anim layui-anim-upbit" style="">
                <dd lay-value="g" class="">g</dd>
                <dd lay-value="kg" class="">kg</dd>
                <dd lay-value="个" class="">个</dd>
                <dd lay-value="元" class="">元</dd>
                <dd lay-value="万元" class="">万元</dd>
                <dd lay-value="mm" class="">mm</dd>
                <dd lay-value="cm" class="">cm</dd>
                <dd lay-value="m" class="">m</dd>
                <dd lay-value="km" class="">km</dd>
            </dl>
          </div> 
      </div>
    </div>
    <script type="text/javascript">
    $('.selectunit input').on('click',function(elem){
      console.log(123)
      if ($('.selectunit').hasClass("layui-form-selected")) {
        $('.selectunit').attr("class","selectunit layui-unselect layui-form-select");
      }else{
        $('.selectunit').attr("class","selectunit layui-unselect layui-form-select layui-form-selected");
      };
    });
    $(".selectunit .layui-anim>dd").each(function(elem){
        $(this).on('click',function(){
            $(".selectunit input").val($(this).attr("lay-value"));
            $('.selectunit').attr("class","selectunit layui-unselect layui-form-select");
        })
    });
    </script>
    <button class="layui-btn costCodeFilter dn" lay-submit="" lay-filter="costCodeFilter">立即提交</button>
  </form>
</div>
<div class="specificItemHtml dn">
    <form class="layui-form add-costCode-form specificItem" action="">
        <div class="layui-form-item re">
            <label class="layui-form-label">运材安选择<span>*</span>：</label>
            <div class="layui-input-block">
              <input type="text" name="ycaName" disabled="disabled" lay-verify="required" autocomplete="off" placeholder="请输入运材安选择" class="layui-input">
            </div>
            <button  type="button" class="layui-btn addTableDetails">选择搜索</button>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">损耗率<span>*</span>：</label>
            <div class="layui-input-block">
              <input type="number" name="scrapRate" lay-verify="required|decimal" autocomplete="off" placeholder="请输入数字" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">基本含量<span>*</span>：</label>
            <div class="layui-input-block">
              <input type="number" name="baseContent" lay-verify="required|decimal" autocomplete="off" placeholder="请输入数字" class="layui-input">
            </div>
        </div>
        <button class="layui-btn specificItemFilter dn" lay-submit="" lay-filter="specificItemFilter">立即提交</button>
    </form>
</div>